#ifndef __DISPLAYDRIVER_H
#define __DISPLAYDRIVER_H

#ifdef __cplusplus
 extern "C" {
#endif
   
#include <stdint.h>
#include "System.h"
#include "Panel.h"


typedef struct{
	Lcd_TypeDef *info;
	void 		(*init)(void);
	void 		(*getFrameBuffer)(void **);
	void 		(*on)(void);
	void 		(*off)(void);
	void 		(*setBacklight)(uint8_t);
	void 		(*drawPoint)(uint16_t,uint16_t,uint32_t);
	void 		(*readPoint)(uint16_t,uint16_t,uint32_t *);
	void 		(*fillColor)(uint16_t,uint16_t,uint16_t,uint16_t,uint32_t);
	void 		(*drawBitmap)(uint16_t,uint16_t,uint16_t,uint16_t,uint8_t *);
}LCD_DEV;

extern LCD_DEV g_lcdDev;

void Lcd_Init(void);
void Lcd_GetFrameBuf(void ** fb);
void Lcd_On(void);
void Lcd_Off(void);
void Lcd_SetBacklight(uint8_t value);
void Lcd_DrawPoint(uint16_t x,uint16_t y,uint32_t color);
void Lcd_ReadPoint(uint16_t x,uint16_t y,uint32_t *color);
void Lcd_FillColor(uint16_t x,uint16_t y,uint16_t ex,uint16_t ey,uint32_t color);
void Lcd_DrawBitmap(uint16_t x,uint16_t y,uint16_t xe,uint16_t ye,uint8_t *Bitmap);


#ifdef __cplusplus
}
#endif
#endif


